home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / vim / src / ops.h < prev    next >
Text File  |  1995-03-09  |  2KB  |  63 lines

  1. /* vi:ts=4:sw=4
  2.  *
  3.  * VIM - Vi IMproved        by Bram Moolenaar
  4.  *
  5.  * Read the file "credits.txt" for a list of people who contributed.
  6.  * Read the file "uganda.txt" for copying and usage conditions.
  7.  */
  8.  
  9. /*
  10.  * ops.h: things shared between normal.c, cmdline.c and ops.c
  11.  */
  12.  
  13. /*
  14.  * Operators
  15.  */
  16. #define NOP     0                /* no pending operation */
  17. #define DELETE    1
  18. #define YANK    2
  19. #define CHANGE    3
  20. #define LSHIFT    4
  21. #define RSHIFT    5
  22. #define FILTER    6
  23. #define TILDE    7
  24. #define INDENT    8
  25. #define FORMAT    9
  26. #define COLON    10
  27. #define UPPER    11
  28. #define LOWER    12
  29.  
  30. /*
  31.  * operator characters; the order must correspond to the defines above
  32.  */
  33. EXTERN char_u *opchars INIT(= (char_u *)"dyc<>!~=Q:Uu");
  34.  
  35. /*
  36.  * When a cursor motion command is made, it is marked as being a character or
  37.  * line oriented motion. Then, if an operator is in effect, the operation
  38.  * becomes character or line oriented accordingly.
  39.  *
  40.  * Character motions are marked as being inclusive or not. Most char. motions
  41.  * are inclusive, but some (e.g. 'w') are not.
  42.  *
  43.  * Generally speaking, every command in normal() should either clear any pending
  44.  * operator (with CLEAROP), or set the motion type variable.
  45.  */
  46.  
  47. /*
  48.  * Motion types
  49.  */
  50. #define MBAD    (-1)            /* 'bad' motion type marks unusable yank buf */
  51. #define MCHAR    0
  52. #define MLINE    1
  53. #define MBLOCK    2
  54.  
  55. EXTERN int        operator INIT(= NOP);    /* current pending operator */
  56. EXTERN int        mtype;                    /* type of the current cursor motion */
  57. EXTERN int        mincl;                    /* true if char motion is inclusive */
  58. EXTERN colnr_t    startvcol;                /* start col for block mode operator */
  59. EXTERN colnr_t    endvcol;                /* end col for block mode operator */
  60. EXTERN long        nlines;                    /* lines between startop and endop + 1 */
  61. EXTERN int        yankbuffer INIT(= 0);    /* current yank buffer */
  62. EXTERN int        no_op;                    /* startop and endop the same */
  63.